package com.szsfm.vehiclemanagement.util;

import android.app.Activity;
import android.content.Intent;
import android.os.Environment;
import android.provider.MediaStore;

/**
 * Created by zhoubigbo on 2017/11/8.
 */
public class ImageCapture {


    private static final String IMG_CAPTURE_PATH = Environment.getExternalStorageState() +"/vehicle/"+System.currentTimeMillis()+".jpg";

    public static void startCapture(Activity context) {
        Intent intent = new Intent();
        // 指定开启系统相机的Action
        intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        context.startActivityForResult(intent, 1);
    }

}
